<?php
if (!defined('CMS_SYSTEM')) die();
if ($disable_site) {
	echo "<center style=\"margin-top:200px;font-weight:bold\">".$disable_message ."</center>";
}else{
$result = $db->sql_query("SELECT n.catid, n.title, n.time, n.hometext, n.bodytext, n.othershow, n.images, n.imgtext, n.source, c.title FROM ".$prefix."_news AS n,".$prefix."_news_cat AS c WHERE n.id='$id' AND n.catid=c.catid AND n.alanguage='$currentlang' AND n.active=1");
if($db->sql_numrows($result) != 1) {
	include_once("templates/".$Default_Temp."/header.php");
	  include_once("templates/".$Default_Temp."/banner.php");
	  include_once("templates/".$Default_Temp."/menu.php");
	  	 echo "<div id=\"wrapper\">";
		 echo "<div class=\"content fix\">";
		    /*
		     * Phan lay ra tin tuc
		     * Le duc vien
		     */
		      echo "<div class=\"w720 fl\">";
		         echo "<div class=\"common\">";
		             echo "<div class=\"title\">";
						echo "<div class=\"text\"><a href=\"\"><span>"._INFO."</span></a></div>";
					 echo "</div>";
					 echo "<div class=\"wrap fix\">";
					    echo "<div class=\"detail\">";
					       echo "<center>"._VIEW_NEWS_NULL."</center>";
					    echo "</div>";
					 echo "</div>";
		         echo "</div>";
		      echo "</div>";
		     /*
		      * Ket thuc phan tin tuc
		      */
		     include_once("templates/".$Default_Temp."/rightbody.php");
		 echo "</div>";
		 themeSlideShow(8);
		 themeFooter();
	     echo "</div>";
	     
	include_once("templates/".$Default_Temp."/footer.php");	
}	
else{
list($catid, $title, $time, $hometext, $bodytext, $othershow, $images, $imgtext, $source, $catname) = $db->sql_fetchrow($result);
$header_page_keyword = $hometext;
$db->sql_query("UPDATE ".$prefix."_news SET hits=hits+1 WHERE id='$id'");

$page_title .= " :: $catname :: $title";

$hometext = strip_tags($hometext, '<a><b><u><i><strong><em>');

include_once("templates/".$Default_Temp."/header.php");
  include_once("templates/".$Default_Temp."/banner.php");
  include_once("templates/".$Default_Temp."/menu.php");
  	 echo "<div id=\"wrapper\">";
	 echo "<div class=\"content fix\">";
	    /*
	     * Phan lay ra tin tuc
	     * Le duc vien
	     */
	     if($title)
	     {
	     	$sub_title="<span class=\"sep\"></span><span>$title</span>";
	     }
	      echo "<div class=\"w720 fl\">";
	         echo "<div class=\"common\">";
	             echo "<div class=\"title\">";
					echo "<div class=\"text\"><a href=\"".url_sid("index.php?f=news&do=categories&catid=$catid")."\"><span>".$catname."</span></a>$sub_title</div>";
				 echo "</div>";
				 echo "<div class=\"wrap fix\">";
				    echo "<div class=\"detail\">";
				       echo "<h1 class=\"head\">$title</h1>";
				       echo "<h2 class=\"lead\">";
							echo "<span>".$hometext."</span>";								
					   echo "</h2>";
					   echo "<p>";
							   echo "<span>".$bodytext."</span>";	
						echo "</p>";
						
				    echo "</div>";
				 echo "</div>";
	         echo "</div>";
	      echo "</div>";
	     /*
	      * Ket thuc phan tin tuc
	      */
	     include_once("templates/".$Default_Temp."/rightbody.php");
	 echo "</div>";
	 themeSlideShow(8);
	 themeFooter();
     echo "</div>";
     
include_once("templates/".$Default_Temp."/footer.php");
}
}
?>